home *** CD-ROM | disk | FTP | other *** search
/ WWII Attack! from Pearl Harbor to Potsdam / WWII Attack - From Pearl Harbor to Potsdam - Disc 3.iso / pc / us / shared.cst / 00029_Script_29 < prev    next >
Text File  |  1999-11-23  |  10KB  |  300 lines

  1. on morph total, delay, downSound, upSound
  2.   if stringP(downSound) then
  3.     puppetsound downSound
  4.   end if
  5.   put the castnum of sprite the clickon into this
  6.   set wait to the timer
  7.   repeat with variable = 1 to total - 1
  8.     repeat while wait > the timer
  9.     end repeat
  10.     set the castnum of sprite the clickon to this + variable
  11.     updatestage
  12.     set wait to the timer + delay
  13.   end repeat
  14.   repeat while the stillDown or soundBusy (1)
  15.   end repeat
  16.   if stringP(upSound) then
  17.     puppetSound(upSound)
  18.   end if
  19.   put the castnum of sprite the clickon into this
  20.   set wait to the timer
  21.   repeat with variable = 1 to total - 1
  22.     repeat while wait > the timer
  23.     end repeat
  24.     set the castnum of sprite the clickon to this - variable
  25.     updatestage
  26.     set wait to the timer + delay
  27.   end repeat
  28.   repeat while soundBusy (1)
  29.   end repeat
  30.   puppetSound 0
  31. end
  32.  
  33. on click downSound, upSound
  34.  
  35.   set variable to the castNum of sprite the clickon
  36.   set the castNum of sprite the clickon to variable + 1
  37.   updateStage
  38.   repeat while the stillDown or soundBusy (1)
  39.   end repeat
  40.     set the castNum of sprite the clickon to variable
  41.   updateStage
  42.   repeat while soundBusy (1)
  43.   end repeat
  44.   puppetSound 0
  45.   updateStage
  46. end 
  47.  
  48. ----------------------------------------------------------
  49. -- This Lingo Script has been written by Greg S. Callen --
  50. --                    for statômedia                    --
  51. --    © Copyright 1992 statômedia All Rights Reseved    --
  52. ----------------------------------------------------------
  53.  
  54. on jogger total, downSound
  55.   if stringP(downSound) then
  56.     puppetSound downSound
  57.   end if
  58.   set myNumber to the castNum of sprite the clickon
  59.   repeat while the stillDown                                   -- Track mouse
  60.     set vert to the mouseV - the locV of sprite the clickon    -- Vertical differance
  61.     set horz to the mouseH - the locH of sprite the clickon    -- Horzontal differance
  62.     if horz<0 then                                             -- If the pointer is left of center
  63.       set angle to 3.1415926 * 3 / 2                           -- go to the large half of circle.
  64.       set offset to -0.001
  65.     else                                                       -- If the pointer is elsewhere
  66.       set angle to 3.1415926 / 2                               -- go to the small half of circle.
  67.       set offset to +0.001
  68.     end if
  69.     put aTan(vert/(offset + horz)) + angle into angle          -- Arctangent in radians
  70.     set angle to integer(angle * (total - 1) / 6.2831852 + 1)  -- Radians to cast word two
  71.     set snap to word 1 of the name of ¨
  72.         cast the castNum of sprite the clickon                 -- Cast name word one
  73.     put " " after snap                                         -- Padded words
  74.     put angle after snap                                       -- Cast name word two
  75.     set the castNum of sprite the clickon¨
  76.         to the number of cast snap                             -- Change the cast member
  77.     updateStage
  78.   end repeat                                                   -- thumb back if mouse is still down
  79.   set the castNum of sprite the clickon to myNumber
  80.   puppetSound 0
  81.   updateStage
  82. end
  83.  
  84. on motion new, offsetH, offsetV, downSound, upSound
  85.   if stringP(downSound) then
  86.     puppetSound downSound
  87.   end if
  88.   put the castnum of sprite the clickon into variable
  89.   put the locH of sprite the clickOn into horz
  90.   put the locV of sprite the clickOn into vert
  91.   set the castnum of sprite the clickon to variable + new
  92.   set the locH of sprite the clickOn to horz + offsetH
  93.   set the locV of sprite the clickOn to vert + offsetV
  94.   updatestage
  95.   repeat while the stillDown or soundBusy (1)
  96.   end repeat
  97.   if stringP(upSound) then
  98.     puppetSound upSound
  99.   end if
  100.   set the castnum of sprite the clickon to variable
  101.   set the locH of sprite the clickOn to horz
  102.   set the locV of sprite the clickOn to vert
  103.   updateStage
  104.   repeat while soundBusy (1)
  105.   end repeat
  106.   puppetSound 0
  107.   updateStage
  108. end
  109.  
  110. on dial total, downSound
  111.   if stringP(downSound) then
  112.     puppetSound downSound
  113.   end if
  114.   repeat while the stillDown                                   -- Track mouse
  115.     set vert to the mouseV - the locV of sprite the clickon    -- Vertical differance
  116.     set horz to the mouseH - the locH of sprite the clickon    -- Horzontal differance
  117.     if horz<0 then                                             -- If the dial is left of center
  118.       set angle to 3.1415926 * 3 / 2                           -- go to the large half of circle.
  119.       set offset to -0.001
  120.     else                                                       -- If the dial is elsewhere
  121.       set angle to 3.1415926 / 2                               -- go to the small half of circle.
  122.       set offset to +0.001
  123.     end if
  124.     put aTan(vert/(offset + horz)) + angle into angle          -- Arctangent in radians
  125.     set angle to integer(angle * (total - 1) / 6.2831852 + 1)  -- Radians to cast word two
  126.     set snap to word 1 of the name of ¨
  127.         cast the castNum of sprite the clickon                 -- Cast name word one
  128.     put " " after snap                                         -- Padded words
  129.     put angle after snap                                       -- Cast name word two
  130.     set the castNum of sprite the clickon¨
  131.         to the number of cast snap                             -- Change the cast member
  132.     updateStage
  133.   end repeat                                                   -- thumb back if mouse is still down
  134.   puppetSound 0
  135. end
  136.  
  137. on toggle top
  138.   set myName to word 1 of the name of cast the castNum of sprite the clickon
  139.   repeat while the stillDown
  140.     set vert to the locV of sprite the clickon - the mouseV
  141.     set vpos to vert / 5
  142.     if vpos > top then 
  143.       set vpos to top
  144.     end if
  145.     if vpos < -top then
  146.       set vpos to -top
  147.     end if
  148.     put myName && vpos into snap
  149.     set the castNum of sprite the clickon to the number of cast snap
  150.     updateStage
  151.   end repeat
  152.   if value(word 2 of snap) < 0 then
  153.     set vpos to -top
  154.   else
  155.     set vpos to top
  156.   end if
  157.   put myName && vpos into snap
  158.   set the text of cast "string" to snap
  159.   set the castNum of sprite the clickon to the number of cast snap
  160.   updateStage
  161. end
  162.  
  163. on switch total, delay, downSound
  164.   if stringP(downSound) then
  165.     puppetSound downSound
  166.   end if
  167.   set variable to the castNum of sprite the clickon
  168.   repeat with n=1 to (abs(total) - 1)
  169.     set wait to the timer + delay
  170.     if total > 0 then
  171.       set the castNum of sprite the clickon to variable + n
  172.     else
  173.       set the castNum of sprite the clickon to variable - n
  174.     end if
  175.     updateStage
  176.     repeat while wait > the timer
  177.     end repeat
  178.   end repeat
  179.   repeat while soundBusy (1)
  180.   end repeat
  181.   puppetSound 0
  182. end
  183.  
  184. on loop total, delay, soundLoop
  185.   if stringP(soundLoop) then
  186.     puppetSound soundLoop
  187.   end if
  188.   set myNumber to the castNum of sprite the clickon
  189.   repeat while the stillDown
  190.     repeat with n=1 to total - 1
  191.       set wait to the timer + delay
  192.       set the castNum of sprite the clickon to myNumber + n
  193.       updateStage
  194.       repeat while wait > the timer
  195.       end repeat
  196.     end repeat
  197.     set the castNum of sprite the clickon to myNumber
  198.     updateStage
  199.   end repeat
  200.   puppetSound 0
  201. end
  202.  
  203. on pointer total, downSound
  204.   if stringP(downSound) then
  205.     puppetSound downSound
  206.   end if
  207.   repeat while the stillDown
  208.     set vert to the mouseV - the locV of sprite the clickon
  209.     set horz to the mouseH - the locH of sprite the clickon
  210.     set angle to 3.1415926 / 4
  211.     put aTan (horz / (0.001 - vert)) + angle into angle
  212.     set angle to integer(angle * (total - 1) / 3.1415926 * 2.0 + 1)
  213.     if angle > total then set angle to total
  214.     if angle < 1 then set angle to 1
  215.     if vert < 0 then
  216.       set snap to word 1 of the name of cast the castNum of sprite the clickon
  217.       put " " after snap
  218.       put angle after snap
  219.       set the castNum of sprite the clickon to the number of cast snap
  220.       updateStage
  221.     end if
  222.   end repeat
  223.   puppetSound 0
  224.   updateStage
  225. end
  226.  
  227. on steps total, delay, downSound
  228.   if stringP(downSound) then
  229.     puppetSound downSound
  230.   end if
  231.   put the castNum of sprite the clickon into myCast
  232.   put the name of cast myCast into myName
  233.   put word 2 of myName into myNumber
  234.   put word 1 of myName into myName
  235.   repeat while the stillDown
  236.     set wait to the timer + delay
  237.     set myNumber to value(myNumber) + 1
  238.     if myNumber > total then
  239.       set myNumber to 1
  240.     end if
  241.     put myName && myNumber into myCast
  242.     set the castNum of sprite the clickon to the number of cast myCast
  243.     set the locH of sprite the clickon to the mouseH
  244.     set the locV of sprite the clickon to the mouseV
  245.     updateStage
  246.     repeat while wait > the timer
  247.     end repeat
  248.   end repeat
  249.   puppetSound 0
  250.   updateStage
  251. end
  252.  
  253. on thumb total, delay, downSound
  254.   if stringP(downSound) then
  255.     puppetSound downSound
  256.   end if
  257.   put the castNum of sprite the clickon into myCast
  258.   put the name of cast myCast into myName
  259.   put word 2 of myName into myNumber
  260.   put word 1 of myName into myName
  261.   repeat while the stillDown
  262.     set wait to the timer + delay
  263.     if the mouseV > the locV of sprite the clickon then
  264.       set myNumber to value(myNumber) + 1
  265.       if myNumber > total then
  266.         set myNumber to 1
  267.       end if
  268.     else
  269.       set myNumber to value(myNumber) - 1
  270.       if myNumber < 1 then
  271.         set myNumber to total
  272.       end if
  273.     end if      
  274.     put myName && myNumber into myCast
  275.     set the castNum of sprite the clickon to the number of cast myCast
  276.     updateStage
  277.     repeat while wait > the timer
  278.     end repeat
  279.   end repeat
  280.   puppetSound 0
  281.   updateStage
  282. end
  283.  
  284. on flash downSound, upSound
  285.   if stringP(downSound) then
  286.     puppetSound downSound
  287.   end if
  288.   set the ink of sprite the clickon to 4
  289.   updatestage
  290.   repeat while the stillDown or soundBusy(1)
  291.   end repeat
  292.   if stringP(upSound) then
  293.     puppetSound upSound
  294.   end if
  295.   set the ink of sprite the clickon to 36
  296.   updatestage
  297.   repeat while soundBusy(1)
  298.   end repeat
  299.   puppetSound 0
  300. end